home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 11551 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.0 KB

  1. Path: ingres.co.uk!usenet
  2. From: jonm@ingres.com (Jon Machtynger)
  3. Newsgroups: comp.lang.basic.visual.misc,comp.lang.c,comp.os.ms-windows.programmer.controls
  4. Subject: Re: VBX instances - HCTL values
  5. Date: Mon, 25 Mar 1996 09:30:08 GMT
  6. Organization: Me!
  7. Message-ID: <4j5p85$qv9@zebedee.ingres.co.uk>
  8. References: <4iv5pk$j2q@news.its.com>
  9. Reply-To: jonm@ingres.com
  10. NNTP-Posting-Host: peacky.ingres.com
  11. X-Newsreader: Forte Free Agent 1.0.82
  12.  
  13. Bill,
  14.  
  15. Sorry I could not reply to your email before.  I've had email-out
  16. problems but can use Free-Agent to post.  In any case, I still
  17. can't see how you're getting your problem.
  18.  
  19. To convince you that it should all work.  Take a look at the circ2
  20. or circ3 examples that come with VB3.0 Proffessional edition.
  21.  
  22. In the FireClickIn reoutine, add the following code.
  23.  
  24. char Msg[100];
  25.  
  26. wsprintf(Msg, "HTCL = %d", hctl);
  27. MessageBox(NULL, Msg, NULL, MB_OK);
  28.  
  29. Now creae two circ2 controls.  When you click on each one, it
  30. should show a different value.
  31.  
  32. I can only assume that you've made a user error.  Don't forget
  33. that the VBX is a DLL and therefore shared by *all* controls using it.
  34. So, your global variables are literally that.  If any instance needs to
  35. reference info, make sure you set up an array and search based on
  36. its hctl/hwnd.
  37.  
  38. Hope this helps.
  39.  
  40. Jon
  41. ----------------------------
  42.  
  43. mastbrook@duff.com (Bill Mastbrook) wrote:
  44. >Does anyone know how the HCTL values passed to the main control
  45. >procedure of a VBX are generated?
  46. >Each instance of a VBX that I've created seems to be generating the
  47. >same value for HCTL.  This is causing major problems because any
  48. >events fired within the VBX are always fired in the instance of the
  49. >VBX most recently created (i.e. the second of two VB applications
  50. >started using the VBX).  I'm sure that I'm missing something very
  51. >basic, but there doesn't seem to be any documentation on this.
  52. >Everything I've seen says that these HCTL values are unique.  Period.
  53. >And that's all it says.  ANY ideas of what I might be doing wrong
  54. >would be greatly appreciated.
  55. >Bill
  56.  
  57.  
  58.